const pagesPath = require.resolve('./pages/router')
const pagesAPath = require.resolve('./pagesA/router')
const pagesBPath = require.resolve('./pagesB/router')
module.exports = function (content,loader) {
	/* 加载依赖项 */
	loader.addDependency(pagesPath,pagesAPath,pagesBPath)
	/* 删除模块缓存 */
	delete require.cache[pagesPath,pagesAPath,pagesBPath]
	return {
		"pages": require(pagesPath),
		"subPackages": [require(pagesAPath),require(pagesBPath)],
		// "preloadRule": {
		// 	"pages/index/index": {
		// 		"network": "wifi",//all
		// 		"packages": ["__APP__"]//"__APP__"
		// 	}
		// },
		"tabBar": {
				"color": "#C6C7C9",
				"selectedColor": "#000000",
				"borderStyle": "white",
				"backgroundColor": "#FFFFFF",
				"list": [{ 
						"pagePath": "pages/index/index",
						"text": "首页"
					},
					{ 
						"pagePath": "pages/index/index",
						"text": "pageA"
					},
					{  
						"pagePath": "pages/index/index",
						"text": "pageB"
					} 
				]
			}
	}
}